package com.book.helper;

import com.book.dto.ImgDto;
import com.book.pojo.Img;
import org.springframework.beans.BeanUtils;

/**
 * @Author 李锦程
 * @Date 2021/4/12 2:30 下午
 * @Package com.book.helper
 * @Version 1.0
 */
public class ImgHelper {

    public static Img convertDtoToPo(ImgDto img) {
        if (img == null){
            return new Img();
        }
        Img img1 = new Img();
        BeanUtils.copyProperties(img,img1);
        return img1;
    }
}
